package com.tyqx.hashchainbackend.service;



import com.tyqx.hashchainbean.module.SysRoleResource;
import com.tyqx.hashchainbean.vo.IdVO;
import com.tyqx.hashchainbean.vo.PerOrResourceParamVO;
import com.tyqx.hashchainbean.vo.SysResourceIDVO;
import com.tyqx.hashchainbean.vo.SysRoleResourceVO;
import hashchainutil.common.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface SysRoleResourceService {

    public SysRoleResource getById(Long rrId) throws Exception;

    /**
     * 根据角色查询该角色已经分配哪些资源
     *
     * @param roleId 角色ID
     * @return
     * @throws Exception
     */
    public List<PerOrResourceParamVO> queryRoleResource(Long roleId) throws Exception;

    public Integer getCountByMap(Map<String, Object> param) throws Exception;

    public Integer save(List<SysRoleResourceVO> sysRoleResourceList)throws Exception;

    public Integer modify(SysRoleResource sysRoleResource) throws Exception;

    public Integer removeById(Long rrId) throws Exception;

    public Page<List<SysRoleResource>> queryPageByMap(Map<String, Object> param, Integer pageNo, Integer pageSize) throws Exception;

    public boolean removeById(Long roleId, List<Long> idMap) throws Exception;

    public Integer removeByRoleId(Long roleId);

    public Integer removeByResId(Long resId);

    public List<SysResourceIDVO> getSysRoleResourceByRoleId(Long roleId);
}
